<h1> Pages Manage </h1>
<div class="breadcrumb">
        <a href="/admin/index">Home</a>
         :: <a href="/admin/module">Pages Manage</a>
</div>
<div class="box">
 	<div class="heading">
      	<h1><img alt="" src="/images/admin/module.png"> Pages Manage</h1>
      	<a href="javascript:;" onclick = "popUnder('/admin/page/post');" style = "">
			<img src="/images/button_add.png" style="width:20px ; height:20px;margin-top:10px;margin-left:10px;"></img>
		</a>
    </div>
    <div class="content">
		<?php if(isset($this->currentpage) && $this->currentpage!=null) { ?>
		<table class="list">
        <thead>
			<tr>
			    <td class="left">No</td>
				<td class="left">Page Name</td>
				<td class="left">Description</td>
				<td class="left">Updated</td>
				<td class="right">Action</td>
			</tr>
        </thead>
        <tbody>
         <?php $i=0;
		foreach ($this->currentpage as $page) { $i++;?>
          <tr>
          <td class="left"><?php echo $i;?></td>
          <td class="left"><?php  echo $page["name"];?></td>
          <td class="left"><?php  echo $page["content"];?></td>
          <td class="left"><?php echo $page["updated"];?></td>
            <td class="right">
             [ <a href = "<?php echo $page["link_edit_module"];?>" >Edit_Module</a> ]<?php if ($page['default']== 0){?> / [ <a href = "<?php echo $page["link_delete"];?>" >Delete</a> ] <?php }?>
              </td>
          </tr>
          <?php }?>
                    
       </tbody>
      </table>
      <?php } else {?>
      <div style="text-align: center;padding-top:100px;">No page found!</div>
      <?php }?>
    </div>
</div>
<script type="text/javascript">

function popUnder(url)
{
var w = 800;
var h = 600;
props = "width=" + w + ",";
props += "height=" + h + ",";
props += "titlebar=0,";
props += "toolbar=0,";
props += "location=0,";
props += "menubar=0," ;
props += "scrollbars=1," ;
props += "resizable=0," ;
props += "channelmode=0," ;
props += "directories=0," ;
props += "status=0";

var popwin = window.open("","popwin",props,true);
popwin.location = url ;

self.focus();
}
</SCRIPT>
